jQuery(document).ready(function() {
	//创建JQGRID表格
	var grid = $("#table1").ligerGrid({
        columns: [
                  { display: '物料编号', name: 'code', width: 150 },
                  { display: '物料名称', name: 'name', width: 100},
                  { display: '物料类型', name: 'maType', width: 150 },
                  { display: '型号', name: 'spec', width: 120},
                  { display: '单位', name: 'unit', width: 120},
                  { display: '仓库', name: 'whName', width: 150},
                  { display: '批次', name: 'batch', width: 150},
                  { display: '总库存', name: 'sumQuantity', width: 100 },
                  { display: '一等品数量', name: 'ydengquantity', width: 100 ,render:function(item){
                	  
                	  if(item.ydengquantity == null || item.ydengquantity == ''){
                		  return '0.0';
                	  }
                	  return item.ydengquantity;
                  }},
                  { display: '次品数量', name: 'quantity1', width: 60 ,render : function(row){
                	  if(row.quantity1 == null || row.quantity1 == ''){
                		  return '0.0';
                	  }
                	  return row.quantity1;
                  }},
                  { display: '旧件数量', name: 'quantity2', width: 60 ,render : function(row){
                	  if(row.quantity2 == null || row.quantity2 == ''){
                		  return '0.0';
                	  }
                	  return row.quantity2;
                  }},
                  { display: '冻结数量', name: 'hgquantity', width: 60 ,render : function(row){
                	  if(row.hgquantity == null || row.hgquantity == ''){
                		  return '0.0';
                	  }
                	  return row.hgquantity;
                  }},
                  { display: '在途数量', name: 'bhgquantity', width: 60 ,render : function(row){
                	  if(row.bhgquantity == null || row.bhgquantity == ''){
                		  return '0.0';
                	  }
                	  return row.bhgquantity;
                  }}
                  ],  usePager: true,pageSize:15,pageSizeOptions :[15,30,45,60],enabledSort:false,
                      url : basic_Url+"/list.do",
                      width: '100%', height: '98%', checkbox: false,rownumbers:true
                  });
	$("#pageloading").hide();
	
	
});
